# -*- coding: utf-8 -*-
"""
@author:xuyuntao
@time:2021/2/17:9:45
@email:xuyuntao@189.cn
"""
import math

def getLevels(minNum,maxNum,divisor=5):
    """根据输入minNum，maxNum两个数生成5的倍数的刻度值，返回为一二元元组，
    第一个数为最小刻度，第二个数为最大刻度，均为整数，绝大部分情况下为5的倍数"""
    maxLevel=1
    minLevel=0

    if maxNum<=1 and minNum>=0:
        maxLevel = 1
        minLevel = 0
    elif maxNum<0 and minNum>=-1:
        maxLevel = 0
        minLevel = -1
    else:
        exactDiv_max=math.ceil(maxNum)//divisor
        if math.ceil(maxNum)%divisor>0:
            exactDiv_max+=1
        maxLevel = exactDiv_max * divisor

        exactDiv_min=math.floor(minNum)//divisor
        minLevel = exactDiv_min * divisor


    return minLevel,maxLevel


if __name__=="__main__":
    minNum=-9.7
    maxNum=4.7

    minLevel,maxLevel=getLevels(minNum,maxNum)

    print(minLevel,maxLevel)